import {request} from 'umi';
//访问统计渲染
export const vist = (ip:string,browser:string,engine:string,userAgent:string,url:string,address:string,os:string,device:string)=>{
    if(ip&&browser&&engine){
    return request(`/view?page=1&pageSize=12&ip=${ip}&userAgent=${userAgent}&url=${url}&address=${address}&browser=${browser}&engine=${engine}&os=${os}&device=${device}`)    
    }else{
        return request('/view?page=1&pageSize=12')
    }
    
} 
//删除
export const det = (id:string)=>{
    return request(`/view/${id}`,{
        method:'DELETE'
    })
}